﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CalibrationCollider : MonoBehaviour {

    public static CalibrationCollider Instance;
    public int LeftCalibrationNum = 0;
    public int RightCalibrationNum = 0;

    private void Start()
    {
        Instance = this;
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.name=="L01")
        {
            Debug.Log("左1");
            LeftCalibrationNum = 1;
        }
        else if (collision.gameObject.name == "L02")
        {
            Debug.Log("左2");
            LeftCalibrationNum = 2;
        }
        else if (collision.gameObject.name == "L03")
        {
            Debug.Log("左3");
            LeftCalibrationNum = 3;
        }
        else if (collision.gameObject.name == "L04")
        {
            Debug.Log("左4");
            LeftCalibrationNum = 4;
        }
        //else if (collision.gameObject.name == "R01")
        //{
        //    Debug.Log("右1");
        //    RightCalibrationNum = 1;
        //}
        //else if (collision.gameObject.name == "R02")
        //{
        //    Debug.Log("右2");
        //    RightCalibrationNum = 2;
        //}
        //else if (collision.gameObject.name == "R03")
        //{
        //    Debug.Log("右3");
        //    RightCalibrationNum = 3;
        //}
        //else if (collision.gameObject.name == "R04")
        //{
        //    Debug.Log("右4");
        //    RightCalibrationNum = 4;
        //}
    }
}
